<html>
<body>
<?php 
$moonGradient=new SWFGradient(); 
$moonGradient->addEntry(0.0,225,225,225); 
$moonGradient->addEntry(0.25,200,200,200); 
$moonGradient->addEntry(0.5,175,175,175); 
$moonGradient->addEntry(0.75,125,125,125); 
$moonGradient->addEntry(1.0,0,0,0); 
$myMoon=new SWFShape(); 
$moonFill=$myMoon->addFill($moonGradient, SWFFILL_RADIAL_GRADIENT); 
$moonFill->scaleTo(0.1); 
$moonFill->moveTo(-20,20); 
$myMoon->setRightFill($moonFill); 
$ra = 50; 
$a = $ra * 0.414213562; // = tan(22.5 deg)
$b = $ra * 0.707106781; // = sqrt(2)/2 = sin(45 deg)
$myMoon->movePenTo($x+$ra, $y); 
$myMoon->drawCurveTo($x+$ra,$y-$a,$x+$b,$y-$b); 
$myMoon->drawCurveTo($x+$a,$y-$ra,$x,$y-$ra); 
$myMoon->drawCurveTo($x-$a,$y-$ra,$x-$b,$y-$b); 
$myMoon->drawCurveTo($x-$ra,$y-$a,$x-$ra,$y); 
$myMoon->drawCurveTo($x-$ra,$y+$a,$x-$b,$y+$b); 
$myMoon->drawCurveTo($x-$a,$y+$ra,$x,$y+$ra); 
$myMoon->drawCurveTo($x+$a,$y+$ra,$x+$b,$y+$b); 
$myMoon->drawCurveTo($x+$ra,$y+$a,$x+$ra,$y); 
$myMovie=new SWFMovie(); 
$myMovie->setDimension(300,200); 
$myMovie->setBackground(0,0,0); 
$myMovie->setRate(40); 
$moonShape=$myMovie->add($myMoon); 
$moonShape->moveTo(-50,250); 
$myMovie->streamMp3(fopen("04 - Phil Collins - Against all odds.mp3", "r")); 
for($i=0; $i<400; $i++){ 
$moonShape->moveTo(($i-50),(250-$i*0.75)); 
$myMovie->nextFrame(); 
} 
$myMovie->setFrames(400); 
$myMovie->save("temp/lesson14.swf"); 
?> 

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=objects WIDTH=300 HEIGHT=200>
<PARAM NAME=movie VALUE="temp/lesson14.swf">
<EMBED src="temp/lesson14.swf" WIDTH=300 HEIGHT=200 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> 
</OBJECT>

</body>
</html>